package models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

@Entity
@Table(name = "t_DeliveryOrder")
public class DeliveryOrder_T_Entity {
    private int fdRowId;
    private String arrivePosition;
    private String arriveTime;
    private String auditReason;
    private Integer auditStatus;
    private Integer auditorId;
    private Integer fdContractId;
    private String fdCreateDate;
    private String fdDeliveryOrderId;
    private String fdParentSubId;
    private String fdSubId;
    private BigDecimal fdDeliveryQty;
    private String fdModifiedDate;
    private String fdValidDate;
    private String fdEndDate;
    private int submitter;
    private BigDecimal fdDeliveryQtyAudited;
    private BigDecimal fdDeliveryResult;
    private String fdQueryNow;
    private String fdLastDay;
    private String fdSendPlace;
    private Integer fdParentId;

    @Id
    @Column(name = "fd_RowID", nullable = false)
    public int getFdRowId() {
        return fdRowId;
    }

    public void setFdRowId(int fdRowId) {
        this.fdRowId = fdRowId;
    }

    @Basic
    @Column(name = "arrive_position", nullable = true, length = 255)
    public String getArrivePosition() {
        return arrivePosition;
    }

    public void setArrivePosition(String arrivePosition) {
        this.arrivePosition = arrivePosition;
    }

    @Basic
    @Column(name = "arrive_time", nullable = true)
    public String getArriveTime() {
        return arriveTime;
    }

    public void setArriveTime(String arriveTime) {
        this.arriveTime = arriveTime;
    }

    @Basic
    @Column(name = "audit_reason", nullable = true, length = 100)
    public String getAuditReason() {
        return auditReason;
    }

    public void setAuditReason(String auditReason) {
        this.auditReason = auditReason;
    }

    @Basic
    @Column(name = "audit_status", nullable = true)
    public Integer getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(Integer auditStatus) {
        this.auditStatus = auditStatus;
    }

    @Basic
    @Column(name = "auditor_id", nullable = true)
    public Integer getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Integer auditorId) {
        this.auditorId = auditorId;
    }

    @Basic
    @Column(name = "fd_ContractId", nullable = true)
    public Integer getFdContractId() {
        return fdContractId;
    }

    public void setFdContractId(Integer fdContractId) {
        this.fdContractId = fdContractId;
    }

    @Basic
    @Column(name = "fd_createDate", nullable = true)
    public String getFdCreateDate() {
        return fdCreateDate;
    }

    public void setFdCreateDate(String fdCreateDate) {
        this.fdCreateDate = fdCreateDate;
    }

    @Basic
    @Column(name = "fd_DeliveryOrderID", nullable = false, length = 50)
    public String getFdDeliveryOrderId() {
        return fdDeliveryOrderId;
    }

    public void setFdDeliveryOrderId(String fdDeliveryOrderId) {
        this.fdDeliveryOrderId = fdDeliveryOrderId;
    }

    @Basic
    @Column(name = "fd_ParentSubID", nullable = false, length = 50)
    public String getFdParentSubId() {
        return fdParentSubId;
    }

    public void setFdParentSubId(String fdParentSubId) {
        this.fdParentSubId = fdParentSubId;
    }

    @Basic
    @Column(name = "fd_SubId", nullable = false, length = 50)
    public String getFdSubId() {
        return fdSubId;
    }

    public void setFdSubId(String fdSubId) {
        this.fdSubId = fdSubId;
    }

    @Basic
    @Column(name = "fd_DeliveryQty", nullable = false, precision = 2)
    public BigDecimal getFdDeliveryQty() {
        return fdDeliveryQty;
    }

    public void setFdDeliveryQty(BigDecimal fdDeliveryQty) {
        this.fdDeliveryQty = fdDeliveryQty;
    }

    @Basic
    @Column(name = "fd_ModifiedDate", nullable = false)
    public String getFdModifiedDate() {
        return fdModifiedDate;
    }

    public void setFdModifiedDate(String fdModifiedDate) {
        this.fdModifiedDate = fdModifiedDate;
    }

    @Basic
    @Column(name = "fd_ValidDate", nullable = false)
    public String getFdValidDate() {
        return fdValidDate;
    }

    public void setFdValidDate(String fdValidDate) {
        this.fdValidDate = fdValidDate;
    }

    @Basic
    @Column(name = "fd_EndDate", nullable = true)
    public String getFdEndDate() {
        return fdEndDate;
    }

    public void setFdEndDate(String fdEndDate) {
        this.fdEndDate = fdEndDate;
    }

    @Basic
    @Column(name = "submitter", nullable = false)
    public int getSubmitter() {
        return submitter;
    }

    public void setSubmitter(int submitter) {
        this.submitter = submitter;
    }

    @Basic
    @Column(name = "fd_DeliveryQty_audited", nullable = false, precision = 2)
    public BigDecimal getFdDeliveryQtyAudited() {
        return fdDeliveryQtyAudited;
    }

    public void setFdDeliveryQtyAudited(BigDecimal fdDeliveryQtyAudited) {
        this.fdDeliveryQtyAudited = fdDeliveryQtyAudited;
    }

    @Basic
    @Column(name = "fd_DeliveryResult", nullable = false, precision = 2)
    public BigDecimal getFdDeliveryResult() {
        return fdDeliveryResult;
    }

    public void setFdDeliveryResult(BigDecimal fdDeliveryResult) {
        this.fdDeliveryResult = fdDeliveryResult;
    }

    @Basic
    @Column(name = "fd_QueryNow", nullable = false)
    public String getFdQueryNow() {
        return fdQueryNow;
    }

    public void setFdQueryNow(String fdQueryNow) {
        this.fdQueryNow = fdQueryNow;
    }

    @Basic
    @Column(name = "fd_LastDay", nullable = false)
    public String getFdLastDay() {
        return fdLastDay;
    }

    public void setFdLastDay(String fdLastDay) {
        this.fdLastDay = fdLastDay;
    }

    @Basic
    @Column(name = "fd_SendPlace", nullable = false, length = 50)
    public String getFdSendPlace() {
        return fdSendPlace;
    }

    public void setFdSendPlace(String fdSendPlace) {
        this.fdSendPlace = fdSendPlace;
    }

    @Basic
    @Column(name = "fd_ParentId", nullable = true)
    public Integer getFdParentId() {
        return fdParentId;
    }

    public void setFdParentId(Integer fdParentId) {
        this.fdParentId = fdParentId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DeliveryOrder_T_Entity that = (DeliveryOrder_T_Entity) o;
        return fdRowId == that.fdRowId &&
                submitter == that.submitter &&
                Objects.equals(arrivePosition, that.arrivePosition) &&
                Objects.equals(arriveTime, that.arriveTime) &&
                Objects.equals(auditReason, that.auditReason) &&
                Objects.equals(auditStatus, that.auditStatus) &&
                Objects.equals(auditorId, that.auditorId) &&
                Objects.equals(fdContractId, that.fdContractId) &&
                Objects.equals(fdCreateDate, that.fdCreateDate) &&
                Objects.equals(fdDeliveryOrderId, that.fdDeliveryOrderId) &&
                Objects.equals(fdParentSubId, that.fdParentSubId) &&
                Objects.equals(fdSubId, that.fdSubId) &&
                Objects.equals(fdDeliveryQty, that.fdDeliveryQty) &&
                Objects.equals(fdModifiedDate, that.fdModifiedDate) &&
                Objects.equals(fdValidDate, that.fdValidDate) &&
                Objects.equals(fdEndDate, that.fdEndDate) &&
                Objects.equals(fdDeliveryQtyAudited, that.fdDeliveryQtyAudited) &&
                Objects.equals(fdDeliveryResult, that.fdDeliveryResult) &&
                Objects.equals(fdQueryNow, that.fdQueryNow) &&
                Objects.equals(fdLastDay, that.fdLastDay) &&
                Objects.equals(fdSendPlace, that.fdSendPlace) &&
                Objects.equals(fdParentId, that.fdParentId);
    }

    @Override
    public int hashCode() {

        return Objects.hash(fdRowId, arrivePosition, arriveTime, auditReason, auditStatus, auditorId, fdContractId, fdCreateDate, fdDeliveryOrderId, fdParentSubId, fdSubId, fdDeliveryQty, fdModifiedDate, fdValidDate, fdEndDate, submitter, fdDeliveryQtyAudited, fdDeliveryResult, fdQueryNow, fdLastDay, fdSendPlace, fdParentId);
    }
}
